Files
openstreetmap-mod_tile-pyth…/includes/gen_tile.h
Kai Krueger 1b4c56d8ed Add another priority level (RenderLow) to accommodate rerenders after style changes
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.
2013-08-10 23:05:28 -06:00

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