On 14/07/14 08:41, Carlo Hamalainen wrote:
> Are there any known issues with django/celery not starting tasks? Any
> ideas on how I can debug this?
I think I've found the problem - the data files are not in the verified
state when the post-save hook is called. I tweaked filters/__init__.py:
67 # This hook dispatches a datafile save to a datafile filter.
68 # We only dispatch to the filter if the datafile's preferred
69 # replica is verified.
70 def make_datafile_hook(dfh):
71 def datafile_hook(**kw):
72 datafile = kw.get('instance')
73 if datafile.get_preferred_replica(verified=True):
74 logger.debug('ZZZ: datafile is verified,
calling dfh...')
75 dfh(**kw)
76 else:
77 logger.debug('ZZZ: datafile is NOT verified,
NOT calling dfh...')
78 return datafile_hook
79 logger.debug('ZZZ Creating hook for: ' + str((cls, args,
kw,)))
80 datafile_hook =
make_datafile_hook(self._safe_import(cls, args, kw))
and in my logs I see
/var/log/tardis-test.log:[14/Jul/2014 09:20:34] DEBUG __init__
__init__ ZZZ Creating hook for:
('tardis.tardis_portal.filters.dicom.dicompng.make_filter', ['metablob',
'
http://cai.uq.edu.au/schema/metadata/1'], {})
/var/log/tardis-test.log:[14/Jul/2014 09:20:37] DEBUG __init__
__init__ ZZZ Creating hook for:
('tardis.tardis_portal.filters.dicom.dicompng.make_filter', ['metablob',
'
http://cai.uq.edu.au/schema/metadata/1'], {})
/var/log/tardis-test.log:[14/Jul/2014 09:21:05] DEBUG __init__
datafile_hook ZZZ: datafile is NOT verified, NOT calling dfh...
/var/log/tardis-test.log:[14/Jul/2014 09:21:05] DEBUG __init__
datafile_hook ZZZ: datafile is NOT verified, NOT calling dfh...
/var/log/tardis-test.log:[14/Jul/2014 09:21:05] DEBUG __init__
datafile_hook ZZZ: datafile is NOT verified, NOT calling dfh...
/var/log/tardis-test.log:[14/Jul/2014 09:21:05] DEBUG __init__
datafile_hook ZZZ: datafile is NOT verified, NOT calling dfh...
The odd thing is that when I look at the Replicas table using the
MyTardis admin interface, I see verified=True for each file. So maybe
this is a timing issue with Postgresql?