Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions scripts/qiita
Original file line number Diff line number Diff line change
Expand Up @@ -452,16 +452,24 @@ def start(port, master):

if master:
def callback_function():
for s in qdb.software.Software.iter_active():
active_software = list(qdb.software.Software.iter_active())
sdefinition = [s for s in active_software
if s.type == 'artifact definition']
stransformation = [s for s in active_software
if s.type == 'artifact transformation']
# registering definition artifacts
for s in sdefinition:
s.register_commands()
sleep(0.5)
# sleep to make sure that all definitions are done
sleep(3)
for s in stransformation:
s.register_commands()
# Not sure why this sleep is needed, but when testing in the
# test environment, some of the plugins were not registered
# unless this sleep was added here
sleep(0.5)

ioloop.add_timeout(ioloop.time() + 0.5, callback_function)

# Set a PeriodicCallback for cleaning up the threads every 10 seconds
# Set a PeriodicCallback for cleaning up the threads
# To understand why this is working as expected, check the multiprocessing
# documentation https://docs.python.org/2/library/multiprocessing.html
# 600000 == 10 min
Expand Down