mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-07-29 11:44:17 +00:00

In addition to Render and RenderPrio, add another priority level of RenderLow. The idea is that if you rerender all tiles by touching planet-import-complete and thereby likely overloading the server's rendering capacity you want to prioritize rerendering of tiles that were explicitly marked dirty due to data changes over rerendering due to planet-import-complete updates. This is achieved by splitting rendering requests by if they are "old", or "very old". As the tile expiry sets back the modification date many years, mod_tile splits rendering requests based on how old the tiles are. If they are no more than a certain threshold (currently set to one year) old, they are rendered with lower priority.
35 lines
728 B
C
35 lines
728 B
C
#ifndef GEN_TILE_H
|
|
#define GEN_TILE_H
|
|
|
|
#include "protocol.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
enum queueEnum {queueRequest, queueRequestPrio, queueRequestBulk, queueDirty, queueRender, queueDuplicate, queueRequestLow};
|
|
|
|
struct item {
|
|
struct item *next;
|
|
struct item *prev;
|
|
struct protocol req;
|
|
int mx, my;
|
|
int fd;
|
|
struct item *duplicates;
|
|
enum queueEnum inQueue;
|
|
enum queueEnum originatedQueue;
|
|
};
|
|
|
|
//int render(Map &m, int x, int y, int z, const char *filename);
|
|
void *render_thread(void *);
|
|
struct item *fetch_request(void);
|
|
void delete_request(struct item *item);
|
|
void render_init(const char *plugins_dir, const char* font_dir, int font_recurse);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|