The custom_event_handler takes an event handler that has been stored in Redis and made unique through a combination of a uuid and the job name with which the event handler is associated.
The file is then imported via importlib. The job name is able to contain characters which are not allowed in a module name. For instance, the job names used in the test suite contain dots, which cause the import to fail as importlib thinks this is the name of a module. The job names should be sanitized before turning them into filenames.
The
custom_event_handler
takes an event handler that has been stored in Redis and made unique through a combination of a uuid and the job name with which the event handler is associated.The file is then imported via
importlib
. The job name is able to contain characters which are not allowed in a module name. For instance, the job names used in the test suite contain dots, which cause the import to fail asimportlib
thinks this is the name of a module. The job names should be sanitized before turning them into filenames.