mirror of
https://github.com/bspeice/metrik
synced 2025-08-03 06:04:47 -04:00
More stable hash ID
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
from __future__ import print_function
|
||||
from luigi.task import Task
|
||||
from luigi.parameter import DateParameter, Parameter
|
||||
# noinspection PyUnresolvedReferences
|
||||
@ -25,7 +26,8 @@ class LiborRateTask(Task):
|
||||
currency = Parameter()
|
||||
|
||||
def output(self):
|
||||
return MongoTarget('libor', hash(self.task_id))
|
||||
h = hash(str(self.to_str_params()))
|
||||
return MongoTarget('libor', h)
|
||||
|
||||
def run(self):
|
||||
libor_record = self.retrieve_data(self.date, self.currency)
|
||||
|
Reference in New Issue
Block a user