Skip to main content
Glama
master.js1.41 kB
'use strict'; var geo = require('./geo'); var fee = require('./fee'); var ticker = require('./ticker'); var ethereumTokens = require('./ethereumTokens'); function cleanGeo(interval) { setInterval(function intervalFunction(){ geo.removeOlderThan(interval).catch(console.error); return intervalFunction; }(), interval) } function cacheFees(interval) { setInterval(function intervalFunction() { fee.getFromAPI('smileycoin').then(function(data) { if (global.gc) global.gc(); return fee.save('smileycoin', { minimum: data.minimum, hour: data.hourFee, fastest: data.fastestFee }); }).catch(console.error); return intervalFunction; }(), interval); } function cacheTicker(interval) { setInterval(function intervalFunction() { ticker.getFromAPI().then(function(data) { if (global.gc) global.gc(); return ticker.save(data) }).catch(console.error); return intervalFunction; }(), interval); } function cacheEthereumTokens(interval) { setInterval(function intervalFunction() { ethereumTokens.getFromAPI().then(function(data) { if (global.gc) global.gc(); return ethereumTokens.save(data) }).catch(console.error); return intervalFunction; }(), interval); } module.exports = { cleanGeo: cleanGeo, cacheFees: cacheFees, cacheTicker: cacheTicker, cacheEthereumTokens: cacheEthereumTokens }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fefergrgrgrg/cloudflare-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server