Skip to content

Commit

Permalink
datamodel: policy-loader: avoid dependency on lua-cqueues
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Feb 3, 2025
1 parent 09496a7 commit 21a76cd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions daemon/lua/kres-gen-33.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ struct timeval {
__suseconds_t tv_usec;
};

unsigned sleep(unsigned seconds);

typedef struct knot_dump_style knot_dump_style_t;
extern const knot_dump_style_t KR_DUMP_STYLE_DEFAULT;
struct kr_cdb_api {};
Expand Down
4 changes: 4 additions & 0 deletions daemon/lua/kres-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ struct timeval {
__suseconds_t tv_usec;
};
"
# We use this in policy-loader
printf "
unsigned sleep(unsigned seconds);
"

## Various types (mainly), from libknot and libkres

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cache.open({{ cfg.cache.size_max.bytes() }}, 'lmdb://{{ cfg.cache.storage }}')
-- termination of the policy-loader before it is
-- added into starting_processes in sd_notify.py.
-- If this happens, the READY notification will end with an error.
worker.sleep(1)
C.sleep(1)

-- exit policy-loader properly
quit()

0 comments on commit 21a76cd

Please sign in to comment.