mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
add a sleep to the autoreload loop since we dont need too high cpu load
This commit is contained in:
parent
24c3447d6c
commit
d03a412e5b
1 changed files with 2 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
from pelican.generators import (ArticlesGenerator, PagesGenerator,
|
from pelican.generators import (ArticlesGenerator, PagesGenerator,
|
||||||
StaticGenerator, PdfGenerator)
|
StaticGenerator, PdfGenerator)
|
||||||
|
|
@ -142,6 +143,7 @@ def main():
|
||||||
pelican.run()
|
pelican.run()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
break
|
break
|
||||||
|
time.sleep(.5) # sleep to avoid cpu load
|
||||||
else:
|
else:
|
||||||
pelican.run()
|
pelican.run()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue