#165 PDC send message when ready
Closed 6 years ago Opened 7 years ago by ralph.

We should remove the inefficient/inelegant sleep statement we have in place where MBS waits for PDC to update itself about a new modulemd change.

Instead, PDC should publish a message when its import takes place, and the MBS should wake up in response.


@ralph alternatively, you should continuously query PDC until it is updated if that's easier.

continuously query PDC until it is updated

This is basically what it does now.

See the retry decorator here.

@ralph yeah, I see what you mean. +1 on this idea.

I think it may be related to this one: #211, which is quite simple to workaround/resolve but there should be some more complex solution, in my opinion.

Hopefully I'm not wrong in my thoughts:

As I understand, there's a poller thread waiting for some interval (10 minutes by conf-default). Then, there are messaging/worker threads which put/get work on/from queue.

The main thread is gone after starting poller/messaging/worker threads, so there's no possibility to signal/control running scheduler. It's kind of a semi-daemonized process, as it doesn't fork anywhere to background (for daemon mode; or I can't see it anywhere at least), nor it can be controlled via signals (eg. SIGINT; for foreground mode).

I would suggest using special messages/additional queues for communication between threads and keeping the main thread running for having control/signalling. Then we can distinguish between foreground/daemon mode. For simplicity, it may run in foreground by default, module_build_service_daemon.py would just daemonize it.

FYI, https://github.com/product-definition-center/product-definition-center/issues/492 saw some progress...

.. however, I'm going to close this issue for now as a part of cleaning the backlog.

This one has been open for over a year and we're not prioritizing it anytime soon. If we get space on our roadmap in the future and decide its important enough, let's re-create it.

Metadata Update from @ralph:
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata